Obtains the first attribute that decorates an object class.
Namespace:
Keystone.Polaris
Assembly: Keystone (in Keystone.dll)
Assembly: Keystone (in Keystone.dll)
public static TAtribute GetAttribute<TAtribute>(
this object decoratedClassInstance
)
where TAtribute : Attribute, >, GetAttributes<TAtribute>, FirstOrDefault()
This language is not supported or no code example is available.
Type Parameters
- TAtribute
-
The desired type of attribute to obtain.
Parameters
- decoratedClassInstance
-
Type: object
The
object
that represents the instance of the class whose attribute of the desired type will be obtained.
Return Value
The firstTAtribute
that decorates the given object class, or null reference (Nothing in Visual Basic) if no TAtribute
is found.
Windows, Windows Server, OS X, macOS, iOS, tvOS, Android, Linux, AWS, Azure
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.